#pragma once
#include "SmartPtr.h"
#include <atlsimpcoll.h>

typedef struct tagTrack TRACK;
typedef Smart_ptr::SmartPtr<TRACK> CTrackPtr;
typedef CSimpleArray<CTrackPtr> CTracks;

class CTPFile
{
public:
	CTPFile(void);
	~CTPFile(void);

	BOOL Load(LPCTSTR lpstrFile);
	void Close();

	LPCTSTR GetFile() const;
	LPCTSTR GetTitle() const;
	LPCTSTR GetDestNum() const;

	int GetTrackCount() const;
	const TRACK* GetTrackByIndex(int iIndex) const;
	BOOL GetTrack(DWORD dwTime, int& iTrack, const TRACK** ppTrack) const;

private:
	mutable CTracks	m_Tracks;

	CString	m_strFile;
	CString	m_strTitle;
	CString	m_strDestNum;
};
